home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1996 February / PC Direct CD-ROM (February 1996).iso / install / declare.rul next >
Encoding:
Text File  |  1995-08-28  |  12.4 KB  |  189 lines

  1. // ----------------------------------------------------------------------
  2. // Copyright ⌐ 1995, National Education Training Group, Inc.            -
  3. // All rights reserved.                                                 -
  4. //                                                                      -   
  5. // Skill Builder 3.2 Install Declaration                 by Jerry Malik - 
  6. //                                                                      -
  7. //----------------------------------------------------------------------- 
  8.  
  9. #define MAX_SIZE         145
  10.  
  11. // Define Windows WinHelp Options
  12.  
  13. #define HELP_CONTEXT      0x0001
  14. #define HELP_QUIT         0x0002
  15. #define HELP_CONTENTS     0x0003
  16. #define WM_SYSCOMMAND     0x0112
  17. #define SC_CLOSE          0xF060
  18.  
  19. // Define Windows ShowWindow Options
  20.  
  21. // #define SW_SHOW         5
  22.  
  23. //  Define dialog box buttons
  24. #define IDOK           1
  25. #define IDCANCEL       2
  26. #define IDABORT        3
  27. #define IDRETRY        4
  28. #define IDIGNORE       5
  29. #define IDYES          6
  30. #define IDNO           7
  31.  
  32. //  Define Install types nMediaType to identify which dialog box to display.
  33.  
  34. #define CD_ROM                   1     // Indicates that this is CD-ROM media.
  35. #define PC_CBT                   2     // Indicates that this is PC/CBT media.
  36. #define LAN                      4     // Indicates that this is LAN media.
  37. #define SV_EXISTS                8     // Indicates that this is SkillVantage is loaded.
  38. #define NO_SKILLB_LMGT          16     // Indicates that there is no Skill Builder LMgt for this media.
  39. #define NO_MOVIE                32     // Special case for PC or CD with no movie.
  40. #define AUTO_PAGE_FWD_OFF       64     // Special case for no Auto Page Advance
  41. #define SINGLE_LEARNER         128     // Special case for Single Learner CD-ROM
  42. #define MULTI_LEARNER          256     // Special case for Multi-Learner CD-ROM
  43.  
  44.  
  45. //  Define Installation selections/flags using nInstallOptions
  46.  
  47. #define NO_MGT_SELECT             1  // Indicates that no LMgt was selected.
  48. #define SB_LMGT_SELECT            2  // Indicates that Skill Builder LMgt was selected.
  49. #define SV_MANAGER_SELECT         4  // Indicates that SkillVantage Manager was selected.
  50. #define AUTO_PAGE_FORWARD         8  // Indicates that Auto Page Forward was selected.
  51. #define TIME_OUT                 16  // Indicates that TimeOut was selected.
  52. #define UPDATED_SYSTEM_INI       32  // Indicates that SYSTEM.INI file was updated.
  53. #define UPDATED_WIN_INI          64  // Indicates that WIN.INI file was updated.
  54. #define UPDATED_CONTROL_INI     128  // Indicates that CONTROL.INI file was updated.
  55. #define UPDATED_MPLAYER_INI     256  // Indicates that MPLAYER.INI file was updated.
  56. #define ALL_TO_SKILLV           512  // Indicates that the user wants set to use SkillVantage Manager
  57. #define MASTERY_FULL_SELECT    1024  // Indicates that the user wants set to use SkillVantage Manager
  58. #define MASTERY_PARTIAL_SELECT 2048  // Indicates that the user wants set to use SkillVantage Manager
  59. #define MASTERY_NONE_SELECT    4096  // Indicates that the user wants set to use SkillVantage Manager
  60. #define ANIMATION_ABORTED      8192  // Indicates that MPLAYER.INI file was updated.
  61.  
  62.  
  63.  
  64.  
  65. declare // Must use declare keyword to start variable declaration
  66.  
  67.  
  68.   
  69. string  szBitmapPath[100],      // Defines path to the background bitmap.
  70.     szSBDbase[100],                   // Defines name for Skill Builder Iconware messages database file
  71.     szSourcedir[MAX_SIZE],      // Defines path to initial SRCDIR
  72.     szMessageFile[100],         // Defines path to the dialog box messages file - allows external editing
  73.     szDialogs,                  // Defines path to dialog dll
  74.     szClusterDLL,               // Defines path to the dll that finds drive cluster size
  75.     szDiagSpReqText[100],       // Holds text for Space Required area of dialog boxes
  76.     szDiagSpAvailText[100],     // Holds text for Space Available area of dialog boxes
  77.     szMessages,                 // Holds internal dialog box messages
  78.     szText[255],                // Generic text holder for messages etc. ...
  79.     szText1[255],               // Generic text holder for messages etc. ...
  80.     szText2[100],               // Generic text holder for messages etc. ...
  81.     szWindows[MAX_SIZE],        // Points to the WINDOWS directory
  82.     szNETGINI[MAX_SIZE],         // Holds path and filename pointing to NETG.INI
  83.     szWinSys[MAX_SIZE],         // Points to the Windows System directory
  84.     szWinINI[MAX_SIZE],         // Holds path and filename pointing to Windows WIN.INI file
  85.     szUpdate[255],              // Generic text holder for messages etc. ...
  86.     szNewPath[144],             // Temporary location for holding course installation path and Learner Management path
  87.     szChangeDir[MAX_SIZE],      // Temporary location for holding course installation path and Learner Management path
  88.     szResultPath[MAX_SIZE],     // Holds path to install course - points to the SKILLB directory
  89.     szCoursePath[MAX_SIZE],     // Full path to course including SKILLB and course number
  90.     szLMPath[MAX_SIZE],         // Holds path to install Learner Management files
  91.     szIVIPath[MAX_SIZE],        // Used to build IVI path when creating a batch file to run course from DOS
  92.     szCourse[20],               // Holds course number for installed course
  93.     szCourseName[80],           // Holds course name for installed course
  94.     szTitle[255],               // Holds title in upper-left corner of installation screen
  95.     szIconFile[80],             // Holds the filename for the course icon - e.g. 10000.ico
  96.     szIconTag[100],             // Holds the course title to display with the Windows icon
  97.     szTagFile[15],              // Holds the filename for the split course files used in diskette installations
  98.     szExt[6],                   // Used to build szTagFile - holds diskette number
  99.     szDate[50],                 // Holds date for files when comparing filenames for updates
  100.     szSourcePath[MAX_SIZE],     // Holds path and filename to the INSTALL.INI file 
  101.     szName[100],                // Holds user name - used for license registration
  102.     szCompany[100],             // Holds company name - used for license registration
  103.     szPath[MAX_SIZE],           // Used to build command line for creating course icon
  104.     szLang[6],                  // Holds language code utilizing the Microsoft three letter designation
  105.     szNetwork[10],              // Holds Network - Yes/No value retrieved from INSTALL.INI - this is not used
  106.     szCourseID[50],             // Holds courseid retrieved from INSTALL.INI - this is not used - was used for CDF update
  107.     szUpdateSkillV[2],          // Flag used to indicate that courses should or should not be updated to use SkillVantage
  108.     szTotal[20],                // Used to update course total in NETG.INI - holds total number of courses
  109.     szCount[10],                // Used to update course total in NETG.INI - holds counter value
  110.     szDisk[20],                 // Temporary variable used to extract drive letter and colon
  111.     szCommand[MAX_SIZE],        // Holds path for command line used to create/check icon information
  112.     szCommand2[MAX_SIZE],       // Holds path for command line used to create/check icon information
  113.     szCommand3[MAX_SIZE],       // Holds path for command line used to create/check icon information
  114.     szCommand4[MAX_SIZE],       // Holds path for command line used to create/check icon information
  115.     szPgrp[40],                 // Holds title for Skill Builder program group
  116.     szAutoPage[4],              // Holds value for AutoPage selection
  117.     szFile[80],                 // Used to hold file name information at various points in the program
  118.     szWork[80],                 // Defines working directory
  119.     szTimeOut[4],               // Holds Time Out value of 0 or 50 depending on user selection
  120.     szDialog[50],               // Holds current dialog's name
  121.     szVersion[10],              // Holds current Skill Builder DLL version
  122.     szExec[MAX_SIZE],           // Used to build command line for icon
  123.     szStMgt[6],                 // Used to retrieve and store Student Management value
  124.     NameNum[10],                // Used to update Course section of NETG.INI - holds Name# information
  125.     szItemName[100],            // Stores icon name information for deleting multiple icons
  126.     svCmdLine[255],             // Stores command line information for deleting multiple icons
  127.     svWrkDir[255],              // Stores working directory information for deleting multiple icons
  128.     svIconPath[255],            // Stores icon path information for deleting multiple icons
  129.     svShortCutKey[25],          // Stores shortcut key information for deleting multiple icons
  130.     szAgreement[50],            // Holds agreement name used for license agreement help file(s)
  131.     szClusterSize[10];          // Holds cluster size for install to drive to determine disk space requirements
  132.  
  133.  
  134. INT nSpace,                     // Holds disk space required to load course
  135.     nSpaceAvail,                // Holds space available on install to drive
  136.     nTotalCourse,               // Counter used to determine the number of courses loaded on the system
  137.     nResult,                    // Used to hold dialog box and other miscellaneous values
  138.     nHan,                       // Stores window file handle 
  139.     nFile,                      // Holds handle to files for writing/appending
  140.     nPresent,                   // Holds value of 1 if the course has already been installed - else 0
  141.     bSCREENSAVER,               
  142.     nCount,                     // Miscellaneous counter
  143.     nOffset,                    // Used for appending text strings
  144.     nStrLen,                    // Used for appending text strings
  145.     nStMgt,                     // Holds Student Management value 0, 1, 2 or 3 ...
  146.     nDisk,                      // Holds disk # information for diskette installation file set code
  147.     bDone,                      // Indicates when a dialog is completed
  148.     bDone2,                      // Indicates when a dialog is completed
  149.     nInstallOptions,            // Holds installation option settings/selections
  150.     nMediaType,                 // Holds installation media type information
  151.     nCmdValue,                  // Used to retrieve messages from dialog box controls
  152.     nCmdValue2,                 // Used to retrieve messages from dialog box controls
  153.     nDialog,                    // Holds dialog number
  154.     nHwnd,                      // Holds window handle
  155.     nvIconIndex,                // Holds icon index value for deleting icons
  156.     nvMinimizeFlag,             // Holds minimize flag value for deleting icons
  157.     nTotalAgreements,           // Holds total number of agreements for Single Learner courses
  158.     nClusterSize,               // Holds cluster size for install to drive
  159.     nCheckSpace,                // Flag used to indicate not to check disk space under special conditions
  160.     nHwdInstall;                // Window handle used to reference the Doc2Help help file
  161.      
  162.     
  163. POINTER hWnd;
  164.  
  165. declare
  166.     prototype NEINSTL.GetClusterSize ( string );        // Declare function to get clustersize
  167.     prototype USER.WinHelp( INT, STRING , INT, LONG );  // Declare function to call Windows Help facility
  168.  
  169.  
  170. LONG    lResult;
  171. LIST    listID1, listID2, wsDirList, AgreementList, ChangeDirList;
  172.  
  173.  
  174.  
  175. // Dialog box text definitions - for international use, this text needs to be translated
  176.  
  177. //#define SAME_DRIVE      "The destination path cannot be identical to the source path. \n\nPlease enter a different path."
  178. #define SKILLV_EXIT     "Installation complete.\n\n To start the course, double-click\n on the course icon in the\n SkillVantage program group.\n\n Press OK to exit." // Message used for SkillVantage demo only!
  179. #define SPACE_1         "Not enough space on drive "
  180. #define SPACE_2         " \n\nPlease press Ok and try another target drive."   
  181.                                                                                                     
  182. // Status window and Dialog box titles - for international use, this text needs to be translated
  183. #define SPACE_TITLE     "Insufficient Disk Space"    
  184.  
  185. // ----------------------------------------------------------------------
  186. // Copyright ⌐ 1995, National Education Training Group, Inc.            -
  187. // All rights reserved.                                                 -
  188. //----------------------------------------------------------------------- 
  189.